{config_load file="$language/lang_$language.conf" section="checkout"}
<h1>{#heading_checkout#}</h1>

{if $error!=''}
	<div class="headerError">{$error}</div>
{/if}

{if $CUSTOMERS_IP!=''} 
	<strong>{#text_ip#}</strong> <span class="inputRequirement"><strong>{$CUSTOMERS_IP}</strong></span>
{/if}

<div data-role="collapsible" data-collapsed="false">
	<h3>{#title_shipping_modules#}</h3>
		<div id="not_virtual_modules"{if $VIRTUAL == 1 || $FREE_SHIPPING == 1} style="display:none;"{/if}>
		{$FORM_ACTION_SHIPPING_MODULES}
		<div id="shippings">
		{$SHIPPING_BLOCK}
		</div>
		{if $NO_SHIPPINGS == 1}
		<div>            
		{#text_no_shippings#}
		</div>
		{/if}
		{if $NO_SHIPPINGS != 1}
		{/if}
		<div class="inputRequirement left_space dn" id="shipping_module_error">&nbsp;</div>
		{$FORM_END}
		</div>
		<div id="virtual_modules" class="virtual"{if $VIRTUAL != 1} style="display:none;"{/if}>{$TEXT_VIRTUAL}</div>
		<div id="free_shipping_modules" class="virtual"{if $FREE_SHIPPING != 1} style="display:none;"{/if}>{$FREE_SHIPPING_DESCRIPTION}</div>
</div>

<div data-role="collapsible" data-collapsed="false">
	<h3>{#title_payment_modules#}</h3>
			<div id="payment_modules"{if $GV_COVER=='true'} style="display:none"{/if}>
			{$FORM_ACTION_PAYMENT_MODULES}
			<div id="payments">
			{$PAYMENT_BLOCK}
			</div>
			{if $NO_PAYMENTS == 1}
			<div>
			{#text_no_payments#}
			</div>
			{/if}
			{if $NO_PAYMENTS != 1}
			<div class="checkout_button{$ONE_PAYMENT} btn_replace">{$BUTTON_SAVE_PAYMENT_MODULE}</div>
			{/if}
			<div class="inputRequirement left_space dn" id="payment_module_error">&nbsp;</div>
			{$FORM_END}
			</div>
			<div id="payment_gccover" class="virtual"{if $GV_COVER!='true'} style="display:none"{/if}>{#text_gccover#}</div>
			<div id="payment_gift">{$module_gift}</div>
			<div id="bonus">
				{if $VALUED}  
				<div id="payment_gift"><strong>{#TABLE_HEADING_REDEEM_SYSTEM#}</strong></div>
				<div id="payment_gift">{#TEXT_REDEEM_SYSTEM_START#}{$VALUED}{#TEXT_REDEEM_SYSTEM_START_1#}{$ORDER_TOTAL}{$NOTE}</div>
				<div id="payment_gift">{#TEXT_REDEEM_SYSTEM_SPENDING#} {$MAX_POINTS}{#TEXT_REDEEM_SYSTEM_SPENDING_1#} {$VALUED_MAX_POINTS}{#TEXT_REDEEM_SYSTEM_SPENDING_2#}</div>
				<div id="payment_gift">{$LIMIT_EXACT_TRUE_MAX_POINTS}</div>
				{/if}
				{if $NOTE_NOT_ENOUGH_POINTS}
				<div id="payment_gift">{#INFO_NOT_ENOUGH_POINTS#}</div>
				{/if} 
				{if $REFERRAL_INPUT}
				<div id="payment_gift"><b>{$TABLE_HEADING_REFERRAL}</b></div>
				<div id="payment_gift">{$TEXT_REFERRAL_REFERRED}</div>
				<div id="payment_gift">{$REFERRAL_INPUT}</div>
				{/if}
			</div>                
</div>
<div class="checkout_spacer">&nbsp;</div>



<div data-role="collapsible" data-collapsed="false">
	<h3>{#title_shipping_address#}</h3>
	
        	<div id="not_virtual_address"{if $VIRTUAL == 1} style="display:none;"{/if}>
                <div id="shipping_address">{$SHIPPING_ADDRESS_LABEL}</div>
                <div id="shipping_address_select" style="display:none;">
                <strong>{#address_old#}</strong><br />
                <span id="dyn_shipping_address"></span><br /><br />
                {if $ADDRESS_NEW_POSSIBLE == 1}
                {$FORM_ACTION_SHIPPING_ADDRESS}
                {$MODULE_new_address}<br />
                <span id="shipping_address_error" class="inputRequirement"></span>
                {$FORM_END}
                {else}
                {#address_no_more#}
                {/if}
                </div>
                <div id="shipping_address_button_edit" class="checkout_button btn_replace">{$BUTTON_EDIT_SHIPPING_ADDRESS}</div>
                <div id="shipping_address_button_save" style="display:none;" class="checkout_button">{$BUTTON_BACK_SHIPPING_ADDRESS}{if $ADDRESS_NEW_POSSIBLE == 1} {$BUTTON_SAVE_SHIPPING_ADDRESS}{/if}</div>
            </div>
            <div id="virtual_address" class="virtual"{if $VIRTUAL != 1} style="display:none;"{/if}>{$TEXT_VIRTUAL}</div>
</div>
<div data-role="collapsible" data-collapsed="true">
	<h3>{#title_payment_address#}</h3>
	<p>{$PAYMENT_ADDRESS_LABEL}<br />
            <div style="display:none;">
            <strong>{#address_old#}</strong><br />
            <span id="dyn_payment_address"></span><br /><br />
            {if $ADDRESS_NEW_POSSIBLE == 1}
            {$FORM_ACTION_PAYMENT_ADDRESS}
            {$MODULE_new_address}<br />
            <span id="payment_address_error" class="inputRequirement"></span>
            {$FORM_END}
            {else}
            {#address_no_more#}
            {/if}
            </div>
            <p class="btn_replace">{$BUTTON_EDIT_PAYMENT_ADDRESS}</p>
            <div id="payment_address_button_save" style="display:none;" class="checkout_button">{$BUTTON_BACK_PAYMENT_ADDRESS}{if $ADDRESS_NEW_POSSIBLE == 1} {$BUTTON_SAVE_PAYMENT_ADDRESS}{/if}</div>
	</p>
</div>
<br />

<div data-role="collapsible" data-collapsed="true">
	<h3>{#title_products#} ({$PRODUCTS_HOW_MUCH})</h3> 
	<p>{$PRODUCTS_BLOCK}</p>
</div>
<br />

{$FORM_ACTION}
<div data-role="collapsible" data-collapsed="true">
	<h3>{#title_comments#}</h3>
	<p>{$COMMENTS}</p>
</div>
<br />
{if $AGB_stat == 1}
<div data-role="collapsible" data-collapsed="true">
<h3>{#title_agb#}</h3>
	<p>{$AGB}</p>
</div>
	{if $AGB_CHECKBOX == 'true'}
		<div data-role="fieldcontain">
			<fieldset data-role="controlgroup">
			{$AGB_checkbox}
			<label for="conditions">{#text_accept_agb#}</label>
			</fieldset>
		</div>
	{/if}
<br />
{/if}

{if $REVOCATION_stat == 1 and $REVOCATION}
<div data-role="collapsible" data-collapsed="true">
	<h3>{#title_revocation#}</h3>
	<p>{$REVOCATION}</p>
</div>
	{if $REVOCATION_CHECKBOX == 'true'}
		<div data-role="fieldcontain">
			<fieldset data-role="controlgroup">
				{$REVOCATION_checkbox} 
				<label for="revocation">{#text_accept_revocation#}</label>
			</fieldset>
		</div>
	{/if}
<br />
{/if}

{if $DSG_stat == 1}
<div data-role="collapsible" data-collapsed="true">
	<h3>{#title_dsg#}</h3>
	<p>{$DSG}</p>
</div>
	{if $DSG_CHECKBOX == 'true'}
		<div data-role="fieldcontain">
			<fieldset data-role="controlgroup">
		{$DSG_checkbox} 
		<label for="dsg">{#text_accept_dsg#}</label>
			</fieldset>
		</div>
	{/if}
<br />
{/if}
<div class="checkout_spacer" id="checkout_hiddens">{$HIDDEN_PAYMENT}</div>
<div class="checkout_please_wait" id="checkout_please_wait"></div>
<div class="checkout_error" id="checkout_error_agb"></div>
<div class="checkout_error" id="checkout_error_revocation"></div>
<div class="checkout_error" id="checkout_error_dsg"></div>
<div class="checkout_error" id="checkout_error_payment"></div>
<div class="checkout_error" id="checkout_error_shipping"></div>

<div class="checkout_total" id="checkout_total">{$ORDER_TOTAL}</div><br />
<div class="left">{$BUTTON_ORDER_BACK}</div>
<div class="checkout_button">{$HIDDEN_XAJAX}{$BUTTON_ORDER}</div>
{$FORM_END}
